package top.yaofengqiao.springcloudsimple.payment.biz.domain.pay.service;

import top.yaofengqiao.springcloudsimple.payment.biz.domain.pay.model.entity.PaymentOrderEntity;
import top.yaofengqiao.springcloudsimple.payment.biz.domain.pay.model.req.PaymentSuccessRequest;
import top.yaofengqiao.springcloudsimple.payment.biz.domain.pay.model.valobj.PaymentOrderStatus;
import top.yaofengqiao.springcloudsimple.payment.biz.trigger.http.app.dto.PaymentApplyDTO;
import top.yaofengqiao.springcloudsimple.payment.biz.trigger.http.app.vo.PaymentApplyVO;

import java.util.List;

/**
 * @author yfq
 * @date 2024/6/14 17:08
 * @description
 */
public interface IPaymentService {
    PaymentApplyVO paymentApply(PaymentApplyDTO paymentApplyDTO, long userId);

    boolean paymentSuccessHandle(PaymentSuccessRequest request);

    boolean updatePaymentOrderByPayOrderNo(PaymentOrderEntity paymentOrderEntity);

    PaymentOrderStatus queryPaymentOrderStatus(String payOrderNo);

    PaymentOrderEntity queryByPayOrderNo(String payOrderNo);

    void paymentOrderClose(String rechargeOrderNo);

    /**
     * 查询15分钟内的未支付订单
     *
     * @param startId 起始id
     * @param limit   大小
     * @return ...
     */
    List<PaymentOrderEntity> queryUnPaymentOrder(long startId, int limit);
}
